# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-idna
_pkgname=idna
pkgver=3.3
pkgrel=2
pkgdesc="IDNA 2008 and UTS #46 for Python3"
url="https://github.com/kjd/idna"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="idna-$pkgver.tar.gz::https://github.com/kjd/idna/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-idna" # Backwards compatibility
provides="py-idna=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
7f6b688eaee199c8644e3bd48b95ca4a2a75d431a1d7ff56f12c3b516715a12e2038b06d4a3d821ea1f3c8d20cbe21c8001967db543996da86f716daff729fc8  idna-3.3.tar.gz
"
